﻿using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DGZImp.MdsProject.Devices.Base
{
    public interface IIotServe
    {
        Task StartReadingAsync();
        event PlcDataReceiveHandler OnPlcDataReceive;
        event HttpDataReceiveHandler OnHttpDataReceive;
        event TcpDataReceiveHandler OnTcpDataReceive;
        event WebSocketDataReceiveHandler OnWebSocketDataReceive;
        public void Dispose();
    }

    public delegate void PlcDataReceiveHandler(object sender, ConcurrentDictionary<string, byte[]> e);
    public delegate void HttpDataReceiveHandler(object sender, string e);
    public delegate void TcpDataReceiveHandler(object sender, byte[] e);
    public delegate void WebSocketDataReceiveHandler(object sender, string e);

}
